﻿<Window x:Class="Bookworm.BookwormAppWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:m="clr-namespace:Bookworm.Controls;assembly=Bookworm.Controls"
        Title="BookwormAppWindow"
        Width="1024" 
        Height="768" 
        Background="Transparent" 
        WindowStartupLocation="CenterScreen" 
        Loaded="OnMainWindowLoaded">
    <!--Main Grid -->
    <Grid Grid.Column="1">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <!-- Row 0-->
        <Rectangle HorizontalAlignment="Stretch"                         
                   Height="35"
                   x:Name="topBar"
                   VerticalAlignment="Top"
                   Fill="{DynamicResource BWDefault.RectangleBrush}"                       
                   Stroke="#89000000" /> 
        <!-- Row 0-->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>              
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button Template="{DynamicResource BWDefault.CircularButton}"                    
                HorizontalAlignment="Left"
                x:Name="btnStart" 
                    Click="OnBtnMainMenuClick"
                RenderTransformOrigin="0.5,0.5"                
                VerticalAlignment="Top"                
                Height="45"
                Margin="8,1,2,2"
                Width="46">
                <Button.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                        <SkewTransform AngleX="0"
                                   AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="0"
                                        Y="0" />
                    </TransformGroup>
                </Button.RenderTransform>
                <Image Source="{DynamicResource OrbSun}"
                   Stretch="UniformToFill" />
            </Button>
            <m:SplitButton Content="Current Book"
                           FontSize="14"
                           Padding="35,0,35,0"
                           HorizontalContentAlignment="Center"
                           VerticalContentAlignment="Top" 
						   Style="{StaticResource BWDefault.SplitButtonHorizontal}"						 						   
						   VerticalAlignment="Top" 
						   HorizontalAlignment="Center"  
						   Margin="5,0,5,1"
                           Height="34"
                           BorderThickness="0"
                           Grid.Column="2"
						   Mode="Split"
						   Placement="Bottom">
                <MenuItem Header="MenuItem 1"/>
                <MenuItem Header="MenuItem 2">
                </MenuItem>
            </m:SplitButton>
            <Path Grid.Column="3" Width="1" Height="26" VerticalAlignment="Top" Style="{DynamicResource BWDefault.VerticalLine}"/>
            <m:SplitButton Content="  Library  "	
                           FontSize="14"
                           Padding="35,0,35,0"
                           HorizontalContentAlignment="Center"
                           VerticalContentAlignment="Top" 
						   Style="{StaticResource BWDefault.SplitButtonHorizontal}"						 						   
						   VerticalAlignment="Top"
						   HorizontalAlignment="Center"  
						   Margin="5,0,5,1"
                           Height="34"
                           Grid.Column="4"
						   Mode="Split"
						   Placement="Bottom">
                <MenuItem Header="MenuItem 1"/>
                <MenuItem Header="MenuItem 2">
                </MenuItem>
            </m:SplitButton>
            <Path Grid.Column="5" Width="1" Height="26" VerticalAlignment="Top" Style="{DynamicResource BWDefault.VerticalLine}"/>
            <m:SplitButton Content="Create"	
                           FontSize="14"
                           Padding="35,0,35,0"
                           HorizontalContentAlignment="Center"
                           VerticalContentAlignment="Top"                           
						   Style="{StaticResource BWDefault.SplitButtonHorizontal}"						 						   
						   VerticalAlignment="Top" 
						   HorizontalAlignment="Center"  
						   Margin="5,0,5,1" 
                           Height="34"
                           Grid.Column="6"
						   Mode="Split"
						   Placement="Bottom">
                <MenuItem Header="MenuItem 1"/>
                <MenuItem Header="MenuItem 2">
                </MenuItem>
            </m:SplitButton>
            <Path Grid.Column="7" Width="1" Height="26" VerticalAlignment="Top" Style="{DynamicResource BWDefault.VerticalLine}"/>
            <m:SplitButton Content="Tools"
                           FontSize="14"
                           Padding="35,0,35,0"
                           HorizontalContentAlignment="Center"
                           VerticalContentAlignment="Top" 
						   Style="{StaticResource BWDefault.SplitButtonHorizontal}"						 						   
						   VerticalAlignment="Top"
						   HorizontalAlignment="Center"  
						   Margin="5,0,5,1"
                           Height="34"
                           Grid.Column="8"
						   Mode="Split"
						   Placement="Bottom">
                <MenuItem Header="MenuItem 1"/>
                <MenuItem Header="MenuItem 2">
                </MenuItem>
            </m:SplitButton>
            <Path Grid.Column="11" Width="1" Height="26" VerticalAlignment="Top" Style="{DynamicResource BWDefault.VerticalLine}"/>
            <Border BorderBrush="{DynamicResource BWDefault.PopUpBorder}"
                    Background="{DynamicResource BWDefault.PopUpBorderBackground}"
                    CornerRadius="15,15,15,15"
                    Height="34"
                    Margin="5,1,5,0"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Right"
                    Grid.Column="12"
                    BorderThickness="1">
                <StackPanel Orientation="Horizontal">
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                        HorizontalAlignment="Center" 
                        x:Name="btnList"                                       
                        Height="30"
                        Margin="5,1,5,1"
                        RenderTransformOrigin="0.5,0.5"                
                        VerticalAlignment="Center">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource List}"
                         Width="30"
                   Stretch="UniformToFill" />
                    </Button>
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                        HorizontalAlignment="Center" 
                        x:Name="btnNoteCard"                                       
                        Height="30"
                        Margin="5,1,5,1"
                        RenderTransformOrigin="0.5,0.5"                
                        VerticalAlignment="Center">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource Notecard}"
                         Width="30"
                   Stretch="UniformToFill" />
                    </Button>
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                        HorizontalAlignment="Center" 
                        x:Name="btnCarousal"   
                        Margin="5,1,5,1"
                        Height="30"
                        RenderTransformOrigin="0.5,0.5"                
                        VerticalAlignment="Center">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource Carousal}"
                         Width="30"
                   Stretch="UniformToFill" />
                    </Button>
                </StackPanel>
            </Border>             
        </Grid> 
        <!-- Row 1 Frame-->
        <Frame x:Name="mainFrame"
               Grid.Row="1"
               Source="MainWindow.xaml"               
               Margin="5,5,5,5">
        </Frame>
        <!-- Row 2 Action Buttons -->
        <Border x:Name="brActionButtons"
                Grid.Row="2" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="1"
                            Orientation="Horizontal">
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                HorizontalAlignment="Left"                             
                RenderTransformOrigin="0.5,0.5"                
                VerticalAlignment="Center"                
                Height="25"
                Margin="8,1,2,2"
                Width="26">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource NavigateBack}"
                   Stretch="UniformToFill" />
                    </Button>
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                HorizontalAlignment="Left"                            
                RenderTransformOrigin="0.5,0.5"                
                VerticalAlignment="Top"                
                Height="45"
                Margin="8,1,2,2"
                Width="46">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource ReadEbook}"
                   Stretch="UniformToFill" />
                    </Button>
                    <Button Template="{DynamicResource BWDefault.CircularButton}"
                HorizontalAlignment="Left"                          
                RenderTransformOrigin="0.5,0.5"                
                VerticalAlignment="Center"                
                Height="25"
                Margin="8,1,2,2"
                Width="26">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                                <SkewTransform AngleX="0"
                                   AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                        Y="0" />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <Image Source="{DynamicResource NavigateFront}"
                   Stretch="UniformToFill" />
                    </Button>                                                            
                </StackPanel>
            </Grid>
        </Border>
        <!--Menu PopUp-->
        <Popup x:Name="popUpMainMenu"
               Placement="Bottom"
               PlacementTarget="{Binding ElementName=topBar}"               
               Width="400"                 
               PopupAnimation="Scroll"
               VerticalOffset="3"
               HorizontalOffset="3"
               VerticalAlignment="Top"
               HorizontalAlignment="Left"
               StaysOpen="False"
               Height="400"               
               AllowsTransparency="True">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>            
                <Rectangle Opacity=".3" VerticalAlignment="Top" Fill="{DynamicResource BWDefault.PopUpBorderBackground}" Height="10"/>          
            <Border x:Name="brMainMenu" 
                    Grid.Row="1"
                    Opacity="1"
                    CornerRadius="0,0,10,10"
                    BorderThickness=".3,0,.6,.6"
                    BorderBrush="{DynamicResource BWDefault.PopUpBorder}"
                    Background="{DynamicResource BWDefault.PopUpBorderBackground}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width=".7*"/>
                        </Grid.ColumnDefinitions>
                        <!--Column 0-->
                        <Border Margin="7,0,7,7" BorderThickness=".6" Background="Transparent" BorderBrush="{DynamicResource BWDefault.LineStroke}">                                                    
                        <Border Margin="2,2,2,2" Background="White">
                                <StackPanel Orientation="Vertical">
                                    <m:SplitButton 
                                                   HorizontalContentAlignment="Center"
                                                   VerticalContentAlignment="Top"                           
						                           Style="{StaticResource BWDefault.SplitButtonVertical}"						 						   
						                           VerticalAlignment="Top" 
						                           HorizontalAlignment="Center"  
						                           Margin="0,0,0,0" 
                                                   Height="45"
                                                   Grid.Column="6"
						                           Mode="Split"
						                           Placement="Right">
                                        <m:SplitButton.Content>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <Image Source="{DynamicResource folderLibrary}"
                                                Stretch="UniformToFill"                                                        
                                                       HorizontalAlignment="Left"
                                                       VerticalAlignment="Center"
                                                       />
                                                <TextBlock Background="Transparent"
                                                           Grid.Column="1"
                                                           Text="Create"
                                                           FontSize="14"
                                                           Padding="35,0,35,0"
                                                           Foreground="{DynamicResource BWDefault.ButtonBlackText}"
                                                           HorizontalAlignment="Right"
                                                           VerticalAlignment="Center"/>
                                                
                                            </Grid>
                                        </m:SplitButton.Content>
                                        <MenuItem Header="MenuItem 1"/>
                                        <MenuItem Header="MenuItem 2">
                                        </MenuItem>
                                    </m:SplitButton>                                   
                                    <m:SplitButton 
                                                   HorizontalContentAlignment="Center"
                                                   VerticalContentAlignment="Top"                           
						                           Style="{StaticResource BWDefault.SplitButtonVertical}"						 						   
						                           VerticalAlignment="Top" 
						                           HorizontalAlignment="Center"  
						                            Margin="0,0,0,0" 
                                                   Height="45"
                                                   Grid.Column="6"
						                           Mode="Split"
						                           Placement="Right">
                                        <m:SplitButton.Content>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <Image Source="{DynamicResource Ducky}"
                                                Stretch="UniformToFill"                                                        
                                                       HorizontalAlignment="Left"
                                                       VerticalAlignment="Center"
                                                       />
                                                <TextBlock Background="Transparent"
                                                           Grid.Column="1"
                                                           Text="Library"
                                                           FontSize="14"
                                                           Padding="35,0,35,0"
                                                           Foreground="{DynamicResource BWDefault.ButtonBlackText}"
                                                           HorizontalAlignment="Right"
                                                           VerticalAlignment="Center"/>
                                                
                                            </Grid>
                                        </m:SplitButton.Content>
                                        <MenuItem Header="MenuItem 1"/>
                                        <MenuItem Header="MenuItem 2">
                                        </MenuItem>
                                    </m:SplitButton>
                                    <m:SplitButton 
                                                   HorizontalContentAlignment="Center"
                                                   VerticalContentAlignment="Top"                           
						                           Style="{StaticResource BWDefault.SplitButtonVertical}"						 						   
						                           VerticalAlignment="Top" 
						                           HorizontalAlignment="Center"  
						                           Margin="0,0,0,0" 
                                                   Height="45"
                                                   Grid.Column="6"
						                           Mode="Split"
						                           Placement="Right">
                                        <m:SplitButton.Content>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <Image Source="{DynamicResource Ducky}"
                                                Stretch="UniformToFill"                                                        
                                                       HorizontalAlignment="Left"
                                                       VerticalAlignment="Center"
                                                       />
                                                <TextBlock Background="Transparent"
                                                           Grid.Column="1"
                                                           Text="Tools"
                                                           FontSize="14"
                                                           Padding="40,0,40,0"
                                                           Foreground="{DynamicResource BWDefault.ButtonBlackText}"
                                                           HorizontalAlignment="Right"
                                                           VerticalAlignment="Center"/>
                                                
                                            </Grid>
                                        </m:SplitButton.Content>
                                        <MenuItem Header="MenuItem 1"/>
                                        <MenuItem Header="MenuItem 2">
                                        </MenuItem>
                                    </m:SplitButton>
                                </StackPanel>
                            </Border>
                        </Border>
                        <!--Column 1-->
                        <Path Grid.Column="1" Style="{DynamicResource BWDefault.VerticalLine}"/>
                        <!--Column 2-->
                        <Grid Grid.Column="3"
                              x:Name="RecentItems"
                              Margin="7,0,7,7"
                              Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <StackPanel>
                               <TextBlock Background="Transparent"
                                                           Grid.Column="1"
                                                           Text="Recent Items:"
                                                           FontSize="14"  
                                                           FontWeight="Bold"
                                                           Foreground="{DynamicResource BWDefault.ButtonGoldText}"
                                                           HorizontalAlignment="Left"
                                                           VerticalAlignment="Center"/> 
                            </StackPanel>
                            <StackPanel Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                                <Button x:Name="btnOptions"
                                        Style="{DynamicResource BWDefault.Button}"
                                        Margin="5,5,2,0"
                                        Content="Options"/>
                                <Button x:Name="btnClose"
                                        Style="{DynamicResource BWDefault.Button}"
                                        Margin="5,5,2,0"
                                        Content="Close"/>                                
                            </StackPanel>
                        </Grid>

                    </Grid>                    
                </Border>
           </Grid>

        </Popup>                                     
    </Grid>
</Window>
